package com.immunology.logic.validators;

import com.immunology.dao.UserDao;
import com.immunology.database.transformers.UserTransformer;

public class LoginFieldValidator extends FieldValidator {

	public LoginFieldValidator() {
		super();
	}

	public boolean generalValidateInRegistration(String login) {
		boolean result = false;
		UserDao userDao = new UserDao(new UserTransformer());
		if (!userDao.isLoginInDB(login)) {
			result = true;
		}
		return result;
	}

	public boolean isLoginInDB(String login) {
		boolean result = false;
		UserDao userDao = new UserDao(new UserTransformer());
		if (userDao.isLoginInDB(login)) {
			result = true;
		}
		return result;
	}

}